import random

LETTERS = "abcdefghijkmnopqrstuvwxyz"
DIGITS = "0123456789"
SYMBOLS = "!@#$%&*"
MINLENGTH = 6
MAXLENGTH = 20


def strongPasswordGen(length: int = None) -> str:
    if length is None:
        length = MINLENGTH
    vegetable = LETTERS + DIGITS + SYMBOLS
    return ''.join(random.sample(vegetable, length))


def digitPasswordGen(length: int = None) -> str:
    if length is None:
        length = MINLENGTH
    return ''.join(random.sample(DIGITS, length))


if __name__ == '__main__':
    # 生成32个16位的随机强密码
    for i in range(32):
        pw = strongPasswordGen(16)
        print(pw)